// app.js
//全局执行此文件
import './utils/http'
import './utils/util'
App({
  token:'',
  refreshToken:'',
  onLaunch(){
this.getTokenn()
  },
  getTokenn(){
    wx.getStorage({
      key:'token',
      success:(res)=>{ 
        // console.log(res)
        this.token=res.data
      }
    })
  },
getToken(token,refreshToken){
// token本地存储
wx.setStorageSync('token', token)
// token全局存
this.token=token
//refreshToken本地储存
wx.setStorageSync('refreshToken', refreshToken)
this.refreshToken=refreshToken
}
})
